CREATE TABLE [dbo].[TA_Movimiento](
	[IdMovimiento] [int] IDENTITY(1,1) NOT NULL,
	[Monto] [decimal](18, 2) NULL,
	[Fecha] [datetime] NULL,
	[Descripcion] [varchar](200) NULL,
	[IdCategoria] [int] NULL,
	[IdMedioDePago] [int] NULL,
	[EsIngreso] [bit] NULL,
	[IdCuenta] [int] NULL,
 CONSTRAINT [PK_TA_Movimiento] PRIMARY KEY CLUSTERED 
(
	[IdMovimiento] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[TA_Movimiento]  WITH CHECK ADD  CONSTRAINT [FK_TA_Movimiento_TA_Categoria] FOREIGN KEY([IdCategoria])
REFERENCES [dbo].[TA_Categoria] ([IdCategoria])
GO

ALTER TABLE [dbo].[TA_Movimiento] CHECK CONSTRAINT [FK_TA_Movimiento_TA_Categoria]
GO

ALTER TABLE [dbo].[TA_Movimiento]  WITH CHECK ADD  CONSTRAINT [FK_TA_Movimiento_TA_Cuenta] FOREIGN KEY([IdCuenta])
REFERENCES [dbo].[TA_Cuenta] ([IdCuenta])
GO

ALTER TABLE [dbo].[TA_Movimiento] CHECK CONSTRAINT [FK_TA_Movimiento_TA_Cuenta]
GO

ALTER TABLE [dbo].[TA_Movimiento]  WITH CHECK ADD  CONSTRAINT [FK_TA_Movimiento_TA_MedioDePago] FOREIGN KEY([IdMedioDePago])
REFERENCES [dbo].[TA_MedioDePago] ([IdMedioDePago])
GO

ALTER TABLE [dbo].[TA_Movimiento] CHECK CONSTRAINT [FK_TA_Movimiento_TA_MedioDePago]
GO

